<?php
/**
 * Created by PhpStorm.
 * User: Lenovo
 * Date: 2018/11/29
 * Time: 13:54
 */

namespace app\api\model;


use think\Model;

class Submessage extends Model
{
    protected $autoWriteTimestamp = 'datetime';
    protected $updateTime = false;
    public static function addOpinion($data){
        $re=self::create([
            'userid'=>$data['userid'],
            'txt'=>$data['txt'],
            'type'=>0,
            'status'=>0
        ]);
        return $re;
    }
    public static function addContribute($data){
        $re=self::create([
            'userid'=>$data['userid'],
            'txt'=>$data['txt'],
            'type'=>1,
            'status'=>0
        ]);
        return $re;
    }
    public static function addOrder($data){
        $re=self::create([
            'userid'=>$data['userid'],
            'txt'=>$data['txt'],
            'type'=>2,
            'status'=>0
        ]);
        return $re;
    }
}